//
//  ViewController.swift
//  TEST-SwfityJSON
//
//  Created by 闫萌 on 2/24/16.
//  Copyright © 2016 KuaiLeXue. All rights reserved.
//

import UIKit
import Alamofire
import SwiftyJSON

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        let connstr = "http://shop.cnnavi.com/api.php?ddev=true&method=goodscat.getCat&api_version=1.0"
        let data = NSData(contentsOfURL: NSURL(string: connstr)!)
        let jsonStr = JSON(data:data!)
        let catid = jsonStr["result"][0]["cat_id"].string!
//        print(catid)
        
        
        let json = JSON(data: NSData(contentsOfURL: NSURL(string: connstr)!)!)
        let kid = json["result"][2]["image_url"].bool
        print(json)
        print(kid)
        
    }



}



